
package com.summit.exam.utils;

import com.summit.exam.entity.QuestionBean;
import java.util.ArrayList;

public class UploadExcel {

    public UploadExcel(){

    }

    public static ArrayList<QuestionBean> excel(String path) {

        System.out.println("是Excel07：" + path.endsWith(".xlsx"));

        ArrayList<QuestionBean> a = null;
        if (path.endsWith(".xls")) {
            Excel03 e = new Excel03();
            a = e.getExcel(path);
        } else if (path.endsWith(".xlsx")) {
            Excel07 e = new Excel07();
            a = e.getExcel(path);
        }
        else {
            System.out.println("请上传Excel文件！");
        }
        return a;
    }


}
